a = int (input () )
min = 0
max = 0
if a % 2 ==0:
    print("да")
     else:
        print("нет")
if a % 3 == 0:
    print("да")
    else:
        print("нет")
if a**2 == a:
    print("да")
    else:
        print("нет")
if a % 10 < min :
    min = a
    print(min)
if a % 10 > max:
    max = a
    print(max)
